Function.prototype.call2 = function(object=window,...args){
    console.log('开始写call');
    object.fn = this; // 为object添加了对象后要销毁
    
    object.fn(args);

    delete object.fn;
    
    
}

let foo = {
    value:1
}

function bar(name,age){
    console.log(this.value + '的 name：'+name+' age：'+age);
}



bar.call2(foo,'liuyu',18);